<template>
  <div>
    <h2>班级姓名：{{name}}</h2>
    <h2>班级人数：{{count}}</h2>
    <button @click="showInof()">显示班级信息</button>
  </div>
</template>
  
<script>
  export default {
    name: 'Banji',
    data() {
      return {
         name: 'Java230301',
         count: 49  
     }
    },
    methods: {
        showInof() {
          alert(this.name + " : " + this.count);
        }
    }
  }
</script>
 
<style scoped>
     
</style>